<template >
<van-nav-bar
  title="设置"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
<div style="background-color: azure;">
    <van-cell title="个人资料 " is-link to="/user" />
    <br><br>
    <div>
        <van-cell title="隐私政策" is-link url="https://vant-ui.github.io/vant/#/zh-CN/toast" />
        <van-cell title="海乐生活" is-link url="https://vant-ui.github.io/vant/#/zh-CN/toast" />
        <van-cell title="联系平台：400-015-5599" is-link to="" />
        <van-cell title="用户注销" is-link to="" />
    </div>
    <br>
    <van-button type="default" size="large" @click="logout">退出登录</van-button>
</div >

</template>
<script setup>
import { useRouter } from 'vue-router'
import { ref } from 'vue'
import axios from 'axios';
const router = useRouter()

const onClickLeft = () => history.back();
const logout = () => {
  localStorage.removeItem('token')
  localStorage.removeItem('userid')
  router.push('/')
}

</script>